def func(a, b=5, c=10):
    print('a is ', a, 'and b is', b, 'and c is ', c)


func(1, 2, 3)
func(3, 7)
func(25, c=50)
func(c=100, a=200)


def total(a=5, *numbers, **phoneBooks):
    print('a', a)

    for single_item in numbers:
        print('single_item', single_item)

    for first_part, second_part in phoneBooks.items():
        print(first_part, second_part)


total(10, 1, 2, 5, jack=13, tom=34, kevin=24)


# 函数具有返回值的时候无需提前声明，且返回值类型不固定，即一个函数可以有多个返回类型
def maxinum(x, y):
    if x > y:
        return x
    elif x == y:
        return 'the number is equal'
    else:
        return y


# 文档字符串，可以理解为一段说明内容
def print_max(x, y):
    '''
    prints the maximum number of two numbers
    the two values must be integers
    :param x:
    :param y:
    :return:
    '''

    if x > y:
        print(x, 'is maximum')
    else:
        print(y, 'is maximum')

print_max(3,6)
print(print_max.__doc__)


result = maxinum(5, 5)
print(result)
